package com.xbongbong.saas.enums;

import com.xbongbong.i18n.util.I18nMessageUtil;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;

/**
 * saas业务列表页批量操作汇总
 *
 * @author haibin.zhang
 * @version v1.0
 * @date 2019/1/25 10:19
 * @since v1.0
 */
@Getter
public enum SaasBatchEnum {
    // 批量操作
    DISTRIBUTION("distribution","enum.saasBatch.value.distribution","",""),


    USER_PORTION("userPortion","enum.saasBatch.value.user_portion","",""),

    DEL_USER_PORTION("delUserPortion","enum.saasBatch.value.del_user_portion","",""),

    DEP_PORTION("depPortion","enum.saasBatch.value.dep_portion","",""),

    DEL_DEP_PORTION("delDepPortion","enum.saasBatch.value.del_dep_portion","",""),

    ONLINE("online","enum.saasBatch.value.online","",""),


    OFFLINE("offline","enum.saasBatch.value.offline","",""),


    PURCHASE("purchase","enum.saasBatch.value.purchase","",""),

    WAIT_INSTOCK("instockProduct","enum.saasBatch.value.instockProduct","",""),

    WAIT_OUTSTOCK("outstockProduct","enum.saasBatch.value.outstockProduct","",""),

    PRODUCE("produce","enum.saasBatch.value.produce","",""),


    FINISH("finish","enum.saasBatch.value.finish","",""),


    HANDOVER("handover","enum.saasBatch.value.handover","",""),

    HANDOVER_CHANGE_MAIN("changeMainUser", "enum.saasBatch.value.handover_change_main", "", ""),


    BACK_CUSTOMER("backCustomer","enum.saasBatch.value.back_customer","",""),


    ADD_VISIT_PLAN("addVisitPlan","enum.saasBatch.value.add_visit_plan","",""),


    EDIT_CUSTOMER_STATUS("editCustomerStatus","enum.saasBatch.value.edit_customer_status","",""),

    ADD_MAIN_USER("addMainUser", "enum.saasBatch.value.add_main_user", "", ""),

    DEL_MAIN_USER("delMainUser", "enum.saasBatch.value.del_main_user", "", ""),

    ADD_TEAM_PERSON("addTeamPerson","enum.saasBatch.value.add_team_person","",""),

    ADD_ISOLATION_TEAM_PERSON("addCoUserForIsolation","enum.saasBatch.value.add_isolation_team_person","",""),

    DEL_TEAM_PERSON("delTeamPerson", "enum.saasBatch.value.del_team_person", "", ""),

    DEL_ISOLATION_TEAM_PERSON("delCoUserForIsolation", "enum.saasBatch.value.del_isolation_team_person", "", ""),

    /**
     * 新增团队
     */
    ADD_TEAM("createTeam", "enum.saasBatch.value.add_team", "", ""),

    /**
     * 解散团队
     */
    DISBAND_TEAM("disbandTeam", "enum.saasBatch.value.disband_team", "", ""),

    ARCHIVE_BATCH("archiveBatch","enum.saasBatch.value.archive_batch","",""),


    UNARCHIVE_BATCH("cancelArchive","enum.saasBatch.value.unarchive_batch","",""),



    CREDIT_LIMIT_FREEZE("creditLimitFreeze","enum.saasBatch.value.credit_freeze","",""),

    CREDIT_LIMIT_UNFREEZE("creditLimitUnfreeze","enum.saasBatch.value.credit_unfreeze","",""),

    CREDIT_TEMPORARY_REVOKE("creditTemporaryRevoke","enum.saasBatch.value.credit_temporary_revoke","",""),

    CREDIT_TEMPORARY_NORMAL("creditTemporaryNormal","enum.saasBatch.value.credit_temporary_normal","",""),


    DEL("del","enum.saasBatch.value.del","",""),


    BATCH_PRINT("batchPrint","enum.saasBatch.value.batch_print","",""),


    COMMUNICATE_NOTIFY("communicateNotify","enum.saasBatch.value.communicate_notify","",""),

    CONTRACT_COMPARE("contractCompare", "enum.saasBatch.value.contract_compare","",""),

    SEND_SMS("sendSMS","enum.saasBatch.value.send_sms","",""),


    GET_CUSTOMER("getCustomer","enum.saasBatch.value.get_customer","",""),


    REVERT_BATCH("revertBatch","enum.saasBatch.value.revert_batch","",""),


    REVERT_CANCEL("revertCancel","enum.saasBatch.value.revert_cancel","",""),


    REMOVE_COMPLETELY("removeCompletely","enum.saasBatch.value.remove_completely","",""),


    SET_PAID("setPaid","enum.saasBatch.value.set_paid","",""),


    CANCEL("cancel","enum.saasBatch.value.cancel","",""),


    BATCH_EDIT("batchEdit","enum.saasBatch.value.batch_edit","",""),


    MERGE_INVOICE("mergeInvoice","enum.saasBatch.value.merge_invoice","",""),


    MERGE_PAYMENT("mergePayment","enum.saasBatch.value.merge_payment","",""),
    
    
    SET_PAY_PAID("setPayPaid", "设置为已付款", "", ""),
    MERGE_PAY_PAID("mergePayPaid","合并付款","",""),
    MEEGE_PURCHASE_INVOICE("mergePurchaseInvoice","合并开票","",""),


    MERGE_CUSTOMER("mergeCustomer","enum.saasBatch.value.merge_customer","",""),

    /**
     * 打标签
     */
    ADD_LABEL("addLabel","enum.saasBatch.value.add_Label","",""),
    /**
     * 移除标签
     */
    REMOVE_LABEL("removeLabel","enum.saasBatch.value.remove_Label","",""),

    /**
     * 变更公海分组
     */
    SWITCH_PUBLIC_GROUP("switchPublicGroup","enum.saasBatch.value.switch_public_group","",""),

    /**
     * 变更工单池
     */
    CHANGE_WORK_ORDER_V2_POOL("changeWorkOrderV2Pool","enum.saasBatch.value.change_work_order_v2_pool","",""),

    // 结算
    WORK_ORDER_V2_SETTLEMENT("workOrderV2Settlement","enum.saasBatch.value.workOrderV2Settlement","",""),
    // 回访
    WORK_ORDER_V2_RETURN_VISIT("workOrderV2ReturnVisit","enum.saasBatch.value.workOrderV2ReturnVisit","",""),
    // 分配
    WORK_ORDER_V2_ASSIGN("workOrderV2Assign","enum.saasBatch.value.workOrderV2Assign","",""),
    WORK_ORDER_V2_CANCEL("workOrderV2Cancel","enum.saasBatch.value.workOrderV2Cancel","",""),
    WORK_ORDER_V2_TRANSFER("workOrderV2Transfer","enum.saasBatch.value.handover","",""),


    DISTRIBUTOR_ACCOUNT_ENABLE("distributorAccountEnable","enum.saasBatch.value.distributor_account_enable","",""),
    DISTRIBUTOR_ACCOUNT_DISABLE("distributorAccountDisable","enum.saasBatch.value.distributor_account_disable","",""),
    BLOCK_UP("blockUp","enum.saasBatch.value.block_up","",""),
    // 取消
    QUIT("quit","enum.saasBatch.value.quit","",""),

    ;

    private String attr;
    private String value;
    private String type;
    private String icon;

    SaasBatchEnum(String attr, String value, String type, String icon) {
        this.attr = attr;
        this.value = value;
        this.type = type;
        this.icon = icon;
    }

    public String getValue() {
        return I18nMessageUtil.getMessage(value);
    }

    /**
     * 获取列表团队相关的批量按钮
     */
    public static List<String> getListTeamBatchButton() {
        return Arrays.asList(ADD_MAIN_USER.attr, DEL_MAIN_USER.getAttr(), ADD_TEAM_PERSON.getAttr(), ADD_ISOLATION_TEAM_PERSON.attr,
                DEL_TEAM_PERSON.getAttr(), DEL_ISOLATION_TEAM_PERSON.getAttr(), HANDOVER.attr, HANDOVER_CHANGE_MAIN.attr, ADD_TEAM.attr, DISBAND_TEAM.getAttr(),
                DISTRIBUTION.getAttr());
    }
}


